﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>


</head>
<body>

    <input type="text" id="txtdato" />
    <button type="button" id="btncall"> Call</button>
    <script>

        (function () {

            document.getElementById("btncall").addEventListener("click", function () {
                
                var req = new XMLHttpRequest();
                req.open("GET", "MiCustomServer.ashx", true);

                req.onreadystatechange = function () {
                    if (req.readyState === 4) {
                        document.getElementById("txtdato").innerText = req.responseText;
                    }
                };

                req.send();
                document.getElementById("txtdato").setAttribute("placeholder", "process");
                

            });

        })();

    </script>
</body>
</html>
